Core functionality for Freya PHP