more interface definition and solve some trivial errors.
suports: #5, #8 and #10.