Added 3D and scan support. Fixed style issues