Adding necessary columns, fix js functions.