fixed coding issues etc