Restructure and add coverage