Refactoring and bug fixes

Proper logical negation and unofficial print keyword handled properly