Reorganised method order and added pragmas