Version 2.01: finished code cleaning up and improving