Code structure commited, still testing.