Worked out bugs and completed simpletest successfully