Removed unused download code. Added some control if's