Reworked to coffee script

Signed-off-by: Jakub Koudelka <koudelka.j@gmail.com>