Finished first draft of code