Moved some vars around in front-end js