Added some constants and inline functions