Renamed functions and added beacon json saving.