add object implementation

Please merge my object implementations. Still work in progress, but most of the logical devices including states are implemented.