Custom controls for video and some refactoring (I hope)