Refactored code. Removed Tcllib deps. Fixed #5.