Minor Bug fixes & code changes.