Moved definitions

and fixed syntax