Changed SCM, added some functions, added type conversion