Deleted unused imports, created methods for clarity and added better printing