strip whitespace on end of line
extensive loader logic