Finished basic coding. Still needs some debuggin