Refactor of application.
Profile management implemented.