Functions Wacky

Got it working as needed but needs some polishing and comments…