Error handling + size parser

Added some error handling (incomplete). Size are now parsed into a value
and a unit