Added some backend functions and tests