Fixed some shit, broke others but fuck it.
isEmpty function declared but never used