Fixed various bugs and added tests
Added testdox and increased coverage bounds