Major rewrite. Removed redundant functions, then implimented all error
checking. Need to write 'check for mill' function next.