Changed a few things, removed some testing code.