Initial Code

Work in progress, though several changes have been made