Removed unused lines and functions