Added free variable functionality (imperfect)