Implemented preferences API - all constants now configured through API