Code clean up closes #9