Changed function to retrieve active_semester from admin_settings table
Fixed variable issue(always use a freakin default variable so as to avoid it not being set if there are no leasons/customers/whatever
Added comments, changed table definitions to reflect new usage of the semester
Fixed bug in db def