Debugged and added usage documentation