Reverted test. Renamed some functions.