Removed some ugly code solutions, added new JSON class