Second Commit

Added functions and MySQL support