a few additional style updates, cleaned up the code