Created helpers, general refactoring