Fixed a few code issues
Code clean-up