Moved common helpers to js folder