Cleaned up code

Added some short tags and ternary operators; removed php closing tags at
the end of documents
Merge pull request #7 from MaYo-Dev/cleanup

Cleaned up code