Added testing, fixed a couple things