Minor bugs resolved. Module with auxiliary functions added