Reworked installation and a bit of cleanup