Major changes, prolly still buggy