Further advancements into the new system

Making it easier to read with multiple files, more functions, and better
commenting practices.