Extend functionalities

Cli: fix return value of instance.pad
Errors: add http-status, add badState
Logger: add logError
Objects: add rest Api for relational query
States: refactored with DelayedJob