Merged the two files, got alignment working with blocking, modularized code a bit