Fixed some errors and finished implementation of better loading