Modified Capturer.java
NOTE: very messy, commited only for backup.