Simplified Source by updating everything to functions