initial commit after refactor from html5cam