more cleanup and functionality updating