Fixed important issue when filtering hosts

Due to wrongly written loop it was selecting all the hosts as reserved
and released.
Deleted non-necessary files