some cleanup and setups
merged stuff