Added downloading of related files and cleaned some stuff