Fixed a few issues, modify unit tests so they execute under nose