Some refactoring + added socks proxy script