updates to logging in and general cleanup