Cleaned up the code a bit; added screen orientation declaration in the manifest.