Added beginings of a test for speed, fixed couple minor bugs