major refactor, updated with new bashwapp version