Clean up code
Implement a toList method