added constant c, clean exit for functions and fixed readme