Added toLowerCase function, cleaned up some code to allow for better integration between projects