added basecontroller and other misc stuff