Removed unused code / refactor