Refactored classes in elements package.