Cleaned up comments, try/catch blocks and if conditions