Second commit. Main interface and helper functions.