Library - step one and half

- Moved enum & struct to more appropriate place (also fixes error with
compiling under linux)