Added basic operator precedence
Removed warnings and unused functions