Restructure and collect all methods at the top