Tidying up code format