Cleanup (changed printf to Log calls, removed redundant/commented code.