Fixed style issues and test. Added '\n' to pop_except_from function c… …
…all in step function to account to make sure current_line is updated.