Improving the code adding more features. This corresponds to submission 5, LB = 1.4159