Add most of the functionality