fixed some bugs and applied cosmo theme