Added options menu. Cleaned up some code.