Refactor, add resources for use, keywords, mask settings