Error handling + Bug fixes + New test suite