Code organization was not really good