Reorganise package layout to work as a module