Removed useless stuff and fixed/improved other stuff