Added the functionPosition option + fixes