Minor refactoring

Added handling for whitespaces (std::ws)