Code cleanup, preparing for the beta release