Some restructuring for gradle