Finish initial version of the main module