Fixed download window size
Fixed whitespaces and imports
Fixed working directory (now platform dependent)

Also small code cleanup