Standarise style and fix incorrect prototypes