added gen_server features
renamed two functions
updated pwm_demo to call a pwm gen_server functions