Version 1.3.1 with reformatted code and updated copyright/license