Initial checkin of functions
Fix typos