Start implementing main functionality.