Cleaned out some code
Finished preferences dialog layout