That took a while to wrap my head around but i'm glad I stuck through it and eventually completed all levels including the bonus level.
Good job on beating that bonus level! I did my best to make it challenging but doable.