Beta release, code cleanup