Template started

also reworked open_list function for MOST better perfomance