some cleanup, make backwards compatible for Lita 2/3