Added function to get last inserted id from db class.
Structured and added correct php documentation for the functions