Major renames and slight modifications based on openemr/openemr master.