Cleaned up application by removing redundant code and improved
documentation