Initial Implementation

Built by tamagokun. We can improve further from here.