Fixed method registration. Functions don't work yet.