Updated to have line length as option and minor bug