Implemented version checking
Proper error codes