Removed some crap and added some writelines