Update syntax and style

Update syntax, style and add documentation and contracts.

Replace Assigment attempt with object test.