Removed useless stuff, cleaned code