even more cleanup
added max peripheral reconnections