New functions, moved some classes