Working on Issue #26,and code clean up, fixed naming errors