adding functions for manipulating our sexprs and moved headers into header file.