Fix line ending problems in unit tests + slight improvement to signature formatting

This pull request also fixes two bugs introduced in #51