Removed warnings and improved codebase