Split up functions into files and began adding register feature