Fixed bugs, basic registration functionality