moved _compute_lattice_boundaries, which has nothing directly to do with reading project data, back into AM.pm
Factored out calculation of lattice sizes. Also added lots of comments where needed