Added everything required for the application behaviour.
Updated tests.