Updated packet system + code cleanup