Main stuff implemented but not yet tested (\!)