Formatted code and replaced DB:: calls
teacher addition code