Clean up method
Improve tests