modules: create custom types, fix issues

Signed-off-by: Rohit Yadav <bhaisaab@baagi.org>