Almost done, just need to test all the fn's.