Added compress function to hostlists

Code cleanup