Fixed a bunch of crap, added profile to debug