Finished most of the code. Now to test it.