Added the accessor methods

Changed the inline functions and also other small conventions.