met-1 bug fixed. Also performed some refactoring on exception handling.