Split module source out

Split module source code for use with module builder