Rework packaging + fix some sources