Core functionality and classes