reorganize libray to include functions, added number function, made fixed-ratio better