Scala fixes

Rename init functions and fix custom variables forms.