Improve optimizer, add fastmethod for static call, fixes