Initial commit containing some functions and classes used for ATS