[src] Prelim implementation, needs some cleanup, but I am le tired