Made some functions static inline

1) Added 'static inline' to some functions
2) tidied up parameter list whitespace