removing unnecessary includes/std namespace and added ifdef __cplusplus guard