Working on functions

Option panel needs to be optimized its too messy actually.