Functionized some of the components thingys. Created a library function file.