Removed some horrible hacks