The major code is implemented

Signed-off-by: Delian Delchev <delian.delchev@gmail.com>