Uncomment and updated minimisation so that main works.