Fix Modal popup function (need to work on closing and template)

Signed-off-by: Jonathan Tan <jhow.tan@gmail.com>