Splitup some code into lbs
Splitup some code into libs