refactor to simplify naming conventions, worked out a few resource id bugs