cleanup the code, add modules