minor fix for ajax bool toggle functionality, minor performance fix for
capitalisation function