Modify calc to return advanced result; remove unused templates