More refactoring and cleanup

fixed typos, and changed the assembly mechanism.