Removed varret version of lognptilebalance for error checking, added BL functions.