Revert some changes to allow compilation. Needs to be fixed ASAP