Moved module and report logic to objects.
Introduced more rest in api