Initial code commit. Contains the main functionality.