Make registration handler actually work and some Java conventions bug fixing