fixed typos, cleaned code (in my style :p), made preferences more explanatory