Added a preferences activity and improved comments