Buliding test module

JSON response object for easier testing
Source cleanup