Clean up solution. Decided implemet it on Java