Add bug fixes for contacts and file modules and modularize agreements more.